x86/ioreq server: add device model wrappers for new DMOP
authorYu Zhang <yu.c.zhang@linux.intel.com>
Fri, 7 Apr 2017 15:38:40 +0000 (17:38 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 7 Apr 2017 15:38:40 +0000 (17:38 +0200)
commit306f16436298b35278be92757559851528e0ed46
tree99f88ec22083bcef1b5eb172abefeeb852595d79
parentca2b511d3ff47c2c3250b884f3903271427be0c1
x86/ioreq server: add device model wrappers for new DMOP

A new device model wrapper is added for the newly introduced
DMOP - XEN_DMOP_map_mem_type_to_ioreq_server.

Since currently this DMOP only supports the emulation of write
operations, attempts to trigger the DMOP with values other than
XEN_DMOP_IOREQ_MEM_ACCESS_WRITE or 0(to unmap the ioreq server)
shall fail. The wrapper shall be updated once read operations
are also to be emulated in the future.

Also note currently this DMOP only supports one memory type,
and can be extended in the future to map multiple memory types
to multiple ioreq servers, e.g. mapping HVMMEM_ioreq_serverX to
ioreq server X, This wrapper shall be updated when such change
is made.

Signed-off-by: Yu Zhang <yu.c.zhang@linux.intel.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libs/devicemodel/core.c
tools/libs/devicemodel/include/xendevicemodel.h
tools/libs/devicemodel/libxendevicemodel.map